import request from '@/utils/request'
import qs from 'qs';

// 根据字典类型查询字典数据信息
export function getDicts(linkurl) {
    return request({
      url: linkurl,
      method: 'get'
    })
  }

// 获取城市
export function getCitys(params) {
  return request({
    url: '/task/index/city',
    method: 'get',
    params
  })
}


//获取区域
export function getRegions(params) {
  return request({
    url: '/task/index/area',
    method: 'get',
    params
  })
}

// 标签
export function getTagList(params) {
  return request({
    url: '/resource/admin/tag',
    method: 'get',
    params
  })
}


// 区搜索
export function searchRegion(params) {
  return request({
    url: '/check/index/area_keyword',
    method: 'get',
    params
  })
}


// 
export function getSearchCitys(params) {
  return request({
    url: '/check/index/area_search',
    method: 'get',
    params
  })
}

export function getUserPhone(params) {
  return request({
    url: '/resource/sale/contacts',
    method: 'get',
    params
  })
}

export function getMsgRead(params) {
  return request({
    url: '/resource/index/timer',
    method: 'get',
    params
  })
}


export function searchCity(params) {
  return request({
    url: '/check/index/city_keyword',
    method: 'get',
    params
  })
}



export function getSearchProvince(params) {
  return request({
    url: '/check/index/city_search',
    method: 'get',
    params
  })
}


// 上传图片
export function uploadPhoto(data) {
  return request({
    url: '/check/index/uploadPhoto',
    method: 'post',
    // headers: {
    //   'Content-Type':'application/x-www-form-urlencoded'
    // },
    data
  })
}

// 获取首页图
export function getPhotoData(params) {
  return request({
    url: '/resource/user_group/getPhotoData',
    method: 'get',
    params
  })
}

